import request from '@/utils/request'

export function submitData(data) {
  return request({
    url: '/formulaManageController/submitFormula',
    method: 'post',
    data: data
  })
}

export function getAllSalary() {
  return request({
    url: '/formulaManageController/queryAllSalary',
    method: 'get'
  })
}

export function getFormulaDetail(id) {
  return request({
    url: '/formulaManageController/queryFormulaDetail',
    method: 'get',
    params: {
      id
    }
  })
}

export function queryFormulaManagePage(params) {
  return request({
    url: '/formulaManageController/queryFormulaManagePage',
    method: 'get',
    params
  })
}

export function removeFormulaById(id) {
  return request({
    url: '/formulaManageController/removeFormulaById/' + id,
    method: 'post'
  })
}

export function saveCopyFormula(data) {
  return request({
    url: '/formulaManageController/saveCopyFormula',
    method: 'post',
    data: data
  })
}